<template>
  <div id="app">
    <van-nav-bar
      :title="this.$route.name"
      left-arrow
      @click-left="onClickLeft"
    />
    <router-view />
    <van-tabbar route>
      <van-tabbar-item replace to="/index" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/integral" icon="points">积分商城</van-tabbar-item>
      <van-tabbar-item replace to="/my" icon="contact">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  methods: {
    onClickLeft() {
      this.$router.back()
    },
  }
}
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.van-icon-arrow-left::before {
    font-size: 20px;
    display: inline-block;
    color: #000;
}
</style>
